
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>代码区块 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="list.html" />
    
    
    <link rel="prev" href="block.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    GitBook环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    Markdown语法
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="title.html">
            
                <a href="title.html">
            
                    
                    标题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="font.html">
            
                <a href="font.html">
            
                    
                    字体
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="stage.html">
            
                <a href="stage.html">
            
                    
                    段落
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="block.html">
            
                <a href="block.html">
            
                    
                    区块引用
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.5" data-path="codeBlock.html">
            
                <a href="codeBlock.html">
            
                    
                    代码区块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="list.html">
            
                <a href="list.html">
            
                    
                    列表
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="split.html">
            
                <a href="split.html">
            
                    
                    分割线
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="link.html">
            
                <a href="link.html">
            
                    
                    超链接
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="image.html">
            
                <a href="image.html">
            
                    
                    图片
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.10" data-path="backSlant.html">
            
                <a href="backSlant.html">
            
                    
                    反斜杠
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.11" data-path="mark.html">
            
                <a href="mark.html">
            
                    
                    符号
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.12" data-path="table.html">
            
                <a href="table.html">
            
                    
                    表格
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.13" data-path="flow.html">
            
                <a href="flow.html">
            
                    
                    流程图
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../Log/">
            
                <a href="../Log/">
            
                    
                    日志
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Log/201903.html">
            
                <a href="../Log/201903.html">
            
                    
                    2019年03月
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >代码区块</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x4EE3;&#x7801;&#x533A;&#x5757;">&#x4EE3;&#x7801;&#x533A;&#x5757;</h1>
<ul>
<li>&#x8BED;&#x6CD5;</li>
</ul>
<p><strong>&#x5355;&#x884C;</strong></p>
<p>&#x4EE3;&#x7801;&#x4E4B;&#x95F4;&#x5206;&#x522B;&#x7528;&#x4E00;&#x4E2A;&#x53CD;&#x5F15;&#x53F7;`&#x5305;&#x8D77;&#x6765;</p>
<pre><code>`gitbook init`
</code></pre><p>&#x4EE3;&#x7801;&#x4E0A;&#x4E0B;&#x7A7A;&#x884C;&#xFF0C;&#x56DB;&#x4E2A;&#x7A7A;&#x683C;</p>
<pre><code>    gitbook init
</code></pre><p><strong>&#x591A;&#x884C;</strong></p>
<p>&#x4EE3;&#x7801;&#x4E4B;&#x95F4;&#x5206;&#x522B;&#x7528;&#x4E09;&#x4E2A;&#x53CD;&#x5F15;&#x53F7;&#x5305;&#x8D77;&#x6765;&#xFF0C;&#x4E14;&#x4E24;&#x8FB9;&#x7684;&#x53CD;&#x5F15;&#x53F7;&#x5355;&#x72EC;&#x5360;&#x4E00;&#x884C;</p>
<pre><code>(```)
function add(a,b){
    return a+b;
}
(```)
</code></pre><blockquote>
<p>&#x4E3A;&#x4E86;&#x9632;&#x6B62;&#x8F6C;&#x8BD1;&#xFF0C;&#x524D;&#x540E;&#x4E09;&#x4E2A;&#x53CD;&#x5F15;&#x53F7;&#x5904;&#x52A0;&#x4E86;&#x5C0F;&#x62EC;&#x53F7;&#xFF0C;&#x5B9E;&#x9645;&#x662F;&#x6CA1;&#x6709;&#x7684;</p>
</blockquote>
<ul>
<li>&#x6548;&#x679C;</li>
</ul>
<p>&#x5355;&#x884C;</p>
<p><code>gitbook init</code></p>
<pre><code>gitbook init
</code></pre><p>&#x591A;&#x884C;</p>
<pre><code>function add(a,b){
    return a+b;
}
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="block.html" class="navigation navigation-prev " aria-label="Previous page: 区块引用">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="list.html" class="navigation navigation-next " aria-label="Next page: 列表">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"代码区块","level":"1.2.5","depth":2,"next":{"title":"列表","level":"1.2.6","depth":2,"path":"Markdown/list.md","ref":"Markdown/list.md","articles":[]},"previous":{"title":"区块引用","level":"1.2.4","depth":2,"path":"Markdown/block.md","ref":"Markdown/block.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"Markdown/codeBlock.md","mtime":"2019-03-04T07:32:07.512Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-03-04T11:59:09.105Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

